
0 "ABC Interpreter\n" while outputascii wend pop


0 "Enter a program:" while outputascii wend pop

0            // accumulator
0            // ascii mode
0 inputascii // get the program

while
  // is 'a'?
  dup "a" sub not while pop
    rcycle 1 add cycle
  0 wend pop
  
  // is 'b'?
  dup "b" sub not while pop
    rcycle 1 sub cycle
  0 wend pop
  
  // is 'c'?
  dup "c" sub not while pop
    rcycle dup output cycle
  0 wend pop
  
  // is 'd'?
  dup "d" sub not while pop
    rcycle -1 mul cycle
  0 wend pop
  
  // is 'r'?
  dup "r" sub not while pop
    debug
    rcycle random cycle
  0 wend pop
  
  // is 'n'?
  dup "n" sub not while pop
    rcycle pop 0 cycle
  0 wend pop
  
  pop
wend
